package exercices;

import solver1.SudokuSolver;

public class Trial {
	public static void main(String[] args) {
		myprint(SudokuSrc.a);
		SudokuSolver solver = new SudokuSolver();
		long t = System.currentTimeMillis();
		solver.load(SudokuSrc.b);
		myprint(solver.solve());
		System.out.println("calculating took:" + (System.currentTimeMillis()-t)+"ms");
	}

	public static void myprint(int[] solve) {
		for (int i = 0; i < 9; i++) {
			if (i % 3 == 0)
				System.out.println("----------------------");
			for (int j = 0; j < 9; j++) {
				if (j % 3 == 0)
					System.out.print("|");
				System.out.print(solve[(i * 9) + j] + " ");
			}
			System.out.println("|");
		}

		System.out.println("----------------------");
	}
}
